package com.paginasenlanube.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "category")
class Category {
	
  private int id;

  private String name;

  private List<Item> itemList;

  private Page page;
  
  public Category(){
	  
  }
  
  @Id
  @GeneratedValue
  @Column(name = "id")
  public int getId() {
    return id;
  }

  public void setId(int value) {
    id = value;
  }
  
  @Column(name = "name")
  public String getName() {
    return name;
  }

  public void setName(String value) {
    name = value;
  }

  @OneToMany(cascade = CascadeType.ALL)
  public List<Item> getItemList() {
    return itemList;
  }

  
  public void setItemList(List<Item> value) {
    itemList = value;
  }

  @OneToMany(cascade = CascadeType.ALL)
  public Page getPage() {
	return page;
  }

  public void setPage(Page page) {
	this.page = page;
  }

 

}
